#!/usr/bin/env bash
#  vim:ts=4:sts=4:sw=4:et
#
#  Author: Hari Sekhon
#  Date: 2015-11-11 19:39:17 +0000 (Wed, 11 Nov 2015)
#
#  https://github.com/HariSekhon/Nagios-Plugins
#
#  License: see accompanying Hari Sekhon LICENSE file
#
#  If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback to help improve or steer this or other code I publish
#
#  https://www.linkedin.com/in/HariSekhon
#

set -eu
srcdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

cd "$srcdir/";

. ./utils.sh

# TODO: add difference in master url for Spark <= 1.3 and then re-enable
#for x in 1.3.1 1.4.1 1.5.2; do
for x in 1.4.1 1.5.2 1.6.1; do
    export SPARK_VERSION="$x"
    # will auto follow the corresponding spark script name without -all
    "$srcdir/$(basename "${0/-all}")"
done
